package com.basics.organization.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.basics.api.response.organization.GroupOrganizationListData;
import com.basics.api.response.organization.GroupOrganizationMemberListData;
import com.basics.api.response.organization.OrganizationListData;
import com.basics.api.response.organization.OrganizationMemberListData;
import com.basics.organization.entity.CyOrganizationUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户组织绑定表 Mapper 接口
 * </p>
 *
 * @author WangWei
 * @since 2025-03-09
 */
public interface CyOrganizationUserMapper extends BaseMapper<CyOrganizationUser> {

    List<OrganizationListData> selectJoinOrganizationList(@Param("userId")Long userId);

    IPage<OrganizationMemberListData> selectJoinOrganizationMemberList(Page page,@Param("organizationId")Long organizationId,@Param("groupId")String groupId);

    IPage<GroupOrganizationMemberListData> selectGroupOrganizationMemberList(Page page, @Param("organizationId")Long organizationId,@Param("searchText")String searchText);

    List<GroupOrganizationListData> selectGroupList(@Param("organizationId")Long organizationId);
}
